import type { RouteRecordRaw } from 'vue-router';
import {renderIcon} from "@/utils";
import {ProfileOutlined} from "@vicons/antd";
import {Layout} from "@/router/constant";

export default [
  {
    path: '/analysis',
    name: 'Analysis',
    redirect: '/analysis/device',
    component: Layout,
    meta: {
      title: '智能分析',
      icon: renderIcon(ProfileOutlined),
      sort: 1,
      openType: 1 // 1表示在当前窗口打开
    },
    children: [
      {
        path: '/device',
        name: 'DeviceManagement',
        component: () => import('@/views/analysis/device/Index.vue'),
        meta: {
          title: '摄像头管理',
          keepAlive: true,
        },
      },
      {
        path: '/algorithm',
        name: 'AlgorithmList',
        component: () => import('@/views/analysis/algorithm/Index.vue'),
        meta: {
          title: '算法列表',
          keepAlive: true,
        },
      },
      {
        path: '/task',
        name: 'AnalysisTask',
        component: () => import('@/views/analysis/task/index.vue'),
        meta: {
          title: '视频流分析',
          keepAlive: true,
        },
      },
      {
        path: '/push',
        name: 'PushManagement',
        component: () => import('@/views/analysis/push/index.vue'),
        meta: {
          title: '推送管理',
          keepAlive: true,
        },
      },
      {
        path: '/alarm',
        name: 'AlarmRecord',
        component: () => import('@/views/analysis/alarm/index.vue'),
        meta: {
          title: '告警管理',
          keepAlive: true,
        },
      },
    ],
  },
] as RouteRecordRaw[];
